package com.demo.pattern.controller;


import com.demo.pattern.enums.ContentType;
import com.demo.pattern.service.ChannelFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class TestController {

    private final ChannelFactory channelFactory;

    public TestController(ChannelFactory channelFactory) {
        this.channelFactory = channelFactory;
    }

    @GetMapping("/test")
    public void test() {
        channelFactory.getChannel(ContentType.B).handle();
    }

}
